package org.example.ycsb;

import java.io.Serializable;
import java.util.List;

public class ConfigBean implements Serializable {
//    {
//        "rowNum":2000000000, "numColumns":1, "columnSizes":[512],"readRatio":0.0, "batchSize":10000, "rowKeyLength":
//        100, "tableName":"hbase_benchmark_test01", "hbaseUrl":
//        "ld-k2j12w19q168m0gsm-proxy-lindorm.lindorm.rds.aliyuncs.com:30020", "rmw":true, "initMode":true
//    }

    // 准备压测多少条数据
    private long rowNum;
    // hbase表中有多少列(默认只有一个列族,如果多个列,f1,f2,f3......)
    private int numColumns;
    // 每一个列族下MOCK的数据长度,模拟真实数据大小
    private List<Integer> columnSizes;
    // 读请求比例
    private double readRatio;
    // 每一批请求批次的大小,当然,如果你的请求是读写混合的,1000个元素会被分成两组请求.
    private int batchSize=1000;
    // rowkey长度
    private int rowKeyLength;
    // 表名称
    private String tableName;
    // hbase连接串
    private String hbaseUrl;
    // 如果为true,读请求会再产生一次写请求,用于模拟读数据修改后写入,类似于CDC的场景
    private boolean readModifyWrite;
    // 如果为true,只会写入数据,一般用于压测写入或者初始化写入一批数据后来压测读写场景.
    private boolean initMode;

    public long getRowNum() {
        return rowNum;
    }

    public void setRowNum(long rowNum) {
        this.rowNum = rowNum;
    }

    public int getNumColumns() {
        return numColumns;
    }

    public void setNumColumns(int numColumns) {
        this.numColumns = numColumns;
    }

    public List<Integer> getColumnSizes() {
        return columnSizes;
    }

    public void setColumnSizes(List<Integer> columnSizes) {
        this.columnSizes = columnSizes;
    }

    public double getReadRatio() {
        return readRatio;
    }

    public void setReadRatio(double readRatio) {
        this.readRatio = readRatio;
    }

    public int getBatchSize() {
        return batchSize;
    }

    public void setBatchSize(int batchSize) {
        this.batchSize = batchSize;
    }

    public int getRowKeyLength() {
        return rowKeyLength;
    }

    public void setRowKeyLength(int rowKeyLength) {
        this.rowKeyLength = rowKeyLength;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getHbaseUrl() {
        return hbaseUrl;
    }

    public void setHbaseUrl(String hbaseUrl) {
        this.hbaseUrl = hbaseUrl;
    }

    public boolean isReadModifyWrite() {
        return readModifyWrite;
    }

    public void setReadModifyWrite(boolean readModifyWrite) {
        this.readModifyWrite = readModifyWrite;
    }

    public boolean isInitMode() {
        return initMode;
    }

    public void setInitMode(boolean initMode) {
        this.initMode = initMode;
    }
}
